#include <iostream>
#include <string>
#include <vector>

using namespace std;

struct stu
{

public:
    string name;
    string skill;
    int id;
public:
    stu() {}
    
    stu(string name , string skill ,int id):name(name),skill(skill) ,id(id) {}
};


int main(int argc, char const *argv[])
{

    vector<stu> stu_v_1;

    stu_v_1.push_back(stu("唐三","111",1));
    stu_v_1.push_back(stu("萧炎","222",2));
    stu_v_1.push_back(stu("林动","333",3));

    vector<stu>::iterator it = stu_v_1.begin();
    
    advance(it , 2);

    stu_v_1.insert(it , stu("牧尘" ,"444",4));
    stu_v_1.insert(it , stu("陈平安" ,"555",5));

    for (auto it= stu_v_1.begin(); it != stu_v_1.end() ; it++)
    {
        stu temp = *it;
        cout << "姓名:" << temp.name << "技能:" << temp.skill << "学号:" << temp.id << endl;
    }
    
    cout << endl;

    stu_v_1.pop_back();

    for (auto it = stu_v_1.begin(); it != stu_v_1.end(); it++)
    {
        stu temp = *it;
        cout <<"姓名:" << temp.name << " 技能:" << temp.skill << " 学号:" << temp.id << endl;
    }
    
    cout << endl;
    //
    it = stu_v_1.begin();
    stu_v_1.erase(it);

    for (auto it = stu_v_1.begin(); it != stu_v_1.end(); it++)
    {
        stu temp = *it ;
        cout << "姓名" << temp.name << " 技能:" << temp.skill << " 学号:" << temp.id << endl;
    }
    

    return 0;
}
